home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Interactive 7
/
PC World Interactive 7.iso
/
program
/
asprog.EXE
/
COLDWARM.ASM
< prev
next >
Wrap
Assembly Source File
|
1991-11-15
|
433b
|
23 lines
; COLDWARM.ASM Check cold/warm boot
; by Chia-Chi Chao 11/15/91
;
; returns errorlevel=0 if cold-boot or 1 if warm-boot
org 100H
code segment
assume cs:code
start: push ds
mov ax, 40H ; BIOS data segment
mov ds, ax
mov ax, ds:[72H] ; get reset word
pop ds
cmp ax, 0 ; 0000H if cold-boot
je done
mov al, 1 ; errorlevel=1 if warm-boot
done: mov ah, 4CH ; exit to DOS
int 21H
code ends
end